package cn.demo.gecco.imgbean;

import cn.demo.gecco.geccobean.HouseInfo;
import com.geccocrawler.gecco.annotation.Gecco;
import com.geccocrawler.gecco.annotation.Href;
import com.geccocrawler.gecco.annotation.HtmlField;
import com.geccocrawler.gecco.annotation.Request;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

/**
 * @Author youjp
 * @Description //TODO=
 * @Date $ $
 * @throw
 **/
@Gecco(matchUrl = "https://pixabay.com/zh/images/search/?pagi=1", pipelines = {"consolePipeline", "firstImgSortPipeline"})
public class FirtstImgSort implements HtmlBean {

    @Request
    private HttpRequest request;

    @HtmlField(cssPath = "#content > div > div:nth-child(3) > div > div.flex_grid.credits.search_results > div")
    private List<ImageInfo> List;

    public java.util.List<ImageInfo> getList() {
        return List;
    }

    public void setList(java.util.List<ImageInfo> list) {
        List = list;
    }

    public String getNextPage() {
        return nextPage;
    }

    public void setNextPage(String nextPage) {
        this.nextPage = nextPage;
    }

    /**
     * 下一页按钮的url地址（a标签的href）
     */
    @Href
    @HtmlField(cssPath = "#content > div > a")
    private String nextPage;


    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }


}
